The rough experience of compiling Linux-2.6.32 on the ipset-6.23 kernel, linux2.6.32New version of ipset
Last week, I received a message from the Netfilter email list when I waited for a call from the children's hospital to see a doctor. I listed the new features of the latest version of ipset 6.23, many of which are exactly what I need now, in particular, the ti
The new version number IpsetLast week, a doctor waited at the children's Hospital for a gap called quantity. A mailing list that accepts Netfilterpush information, List Ipset new features of the latest 6.23 version number, very like what I need now is, especially the timeout and skbinfo support parameters, for more details, please refer to their own manual, if you do not want to see so much, I here simply paste:TimeoutAll set types supports the option
New version of IpsetLast week, in the children's Hospital to wait for a small doctor waiting for the interval, received a push message NetFilter mailing list, Ipset the latest 6.23 version of the new features, many are exactly what I need, especially the timeout and skbinfo parameter support, specific details please self-view manual, if you do not want to see so much, I here simply paste:TimeoutAll set types supports the optional timeout parameter whe
Iptables is a user-space tool that configures firewall rules in the Linux kernel, which is actually part of the NetFilter framework. Probably because Iptables is the most common part of the NetFilter framework, this framework is often called iptables, Iptables is a firewall solution introduced by Linux from version 2.4.Ipset is an extension of iptables, which allows you to create rules that match the entire address sets (address collection). Unlike or
What is Ipset? Ipset is an extension of iptables, which allows you to create rules that match the entire set of addresses. And unlike ordinary iptables chain can only single IP matching, IP collection stored in the index of the data structure, the structure of the real-time collection of large or efficient search, in addition to some common situations, such as blocking some dangerous host access to the mach
Reference: http://blog.csdn.net/dog250/article/details/41123469 on the Linux-2.6.32 kernel to compile ipset-6.23 's bumpy experienceHttp://netsecurity.51cto.com/art/201501/463157.htm How to efficiently block malicious IP addresses on Linux?Extension of the http://blog.csdn.net/opensure/article/details/46047931 Ipset-linux firewallhttp://www.xitongzhijia.net/xtjc/20150106/34147_2.html Linux denies foreign IP
can only single IP matching, IP collection stored in the index of the data structure, the structure of the real-time collection of large or efficient search, in addition to some common situations, such as blocking some dangerous host access to the machine, thereby reducing system resource consumption or network congestion, Ipsets also has a number of new firewall design methods and simplifies configuration. Official website: http://ipset.netfilter.org/Installation of IpsetFirst install the depe
independent IP addresses without the CIDR (classless Inter-Domain Routing) prefix, what should you do? You need 1000 iptable rules! This is obviously not suitable for large-scale shielding.
$ Sudo iptables-a input-s 1.1.1.1-p TCP-j DROP
$ Sudo iptables-a input-s 2.2.2.2-p TCP-j DROP
$ Sudo iptables-a input-s 3.3.3.3-p TCP-j DROP
....
What is an IP address set?
At this time, the IP address set was launched. An IP address set is a kernel feature that allows multiple (independent) IP addresse
structures. Once the IP set is created, you can create a iptables rule to match the collection.
You'll soon see the benefits of the IP collection, which allows you to match multiple IP addresses with a iptable rule! You can construct IP sets with multiple IP addresses and port numbers, and you can dynamically update rules without performance impact.
Installing the Ipset tool in Linux
To create and manage IP sets, you need to use a user space tool
dynamically update rules without performance impact.Installing the Ipset tool in LinuxIn order to create and manage IP sets, you need to use a user space tool called Ipset.To install on Debian, Ubuntu, or Linux Mint:
$ sudo apt-get install ipset
Installed on Fedora or Centos/rhel 7:
$ sudo yum install ipset
Use the
It is designed to set up a whitelist for accesses to the host machine and virtual machine, and only allow access from the IP address specified by the company
Create an IP address whitelist
Ipset create whitelist hash: Net
Ipset add whitelist 10.0.1.52
Ipset add whitelist 10.0.1.142
Import forward and input to the custom chain
Iptables-N custom
Virtual machin
Recently I am reading ipset'sCodeIpset implements an IP address set operation, which is a subset of Netfilter operations in Linux. ipset plays a role in netfilter. Its logic is simple, basically pureAlgorithmThe kernel debugging is rarely involved, so I want to study it in detail. Because the working machine is windows, I have to copy the compressed package to Windows, decompress it with WinRAR, decompress it, and start to read the code, no match regi
Password Code blasting moduleBlasting SSH service password guessing most of them are search SSH under Linux this time we can see a lot of search ssh_login find a dictionaryUse Auxiliary/scanner/ssh/ssh_loginShow Optionsset RHOST IP address set pass_file passset USERNAME rootexploitThe operation of the other services below it is the same, not one operation.Demolition hack telnet slow search telnet_loginuse auxiliary/scanner/telnet/telnet_loginshow opiotnsset RHOST
would be a good thing to assume that a high-speed discovery failed before it was created. 3. The route cache lookup is the same for similar cache lookups. For example, to find the route cache, we know that the route cache has an expiration time, assuming that a router has too much traffic, there will be a large number of route entries by the cache, to find the cache itself is a very large amount of overhead, hash conflict is very likely. It took so much strength not to find out. Had to enter t
. However, the disadvantage is that the application you want to protect must be built in a way that supports TCP wrappers. In addition, TCP wrappers is not always available on various platforms (for example, Arch Linux does not support it ). Another method is to combine the country-based GeoIP information, set ipset, and apply it to iptables rules. The latter method looks more promising, because iptables-based filters are unrelated to applications and
lookup of the route cache, we know that the route cache has an expiration time, if a router too much traffic, there will be a large number of route entries are cache, Find the cache itself is a big expense, the likelihood of hash conflict is very large, the cost of such a great effort has not been found, had to enter the slow path, is absolutely angry dead!In fact, in the presence of large traffic flows, the lookup cost of the routing cache will be much larger than the slow path cost of the reg
OpenSSL (filename is shadowsocks-libev-spec-x.xx.ipk) and Polarssl (file name is SHADOWSOCKS-LIBEV-SPEC-POLARSSL-X.XX.IPK) Two versions selected, ROM If the space is tight, choose the latter.
Install the necessary packages first, if you want to use the Polarssl version of the shadowsocks (Polarssl smaller):
opkg Install Ipset Libpolarssl resolveip iptables-mod-tproxy
If you want to use the normal version (OpenSSL) shadowsocks, then (OpenSSL compat
Mao's chair going to battle with bayonets? No! No! No! Let's not talk about Nf-hipac, and similar to the above also ipset,ipset is encapsulated into a match and iptables linkage? Iptables is not bad, wrong in people simply should not directly expand each simple function into a set of Match/target consortium, the final form of disgusting code! Is that right?All right! I admit that the above yy are all right
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.